f = open('test/demo2.txt',mode='r',encoding='utf8')
# f.write('今天天气很好\n')
# f.write('哈哈哈\n')
# f.write('董一航\n')
# f.writelines(['hello\n','python\n','golang\n'])
# content = f.readlines()
# print(content)
# content = f.read(5)
# print(content)
#
# content = f.read(5)
# print(content)
#
# content = f.read(5)
# print(content)
#
# content = f.read(5)
# print(content)
#
# content = f.read(5)
# print(content)

while True:
    content = f.read(5)
    if not content:
        break
    print(content)
#
# f = open('test/demo2.txt',mode='rb')
# content = f.read(5)
# print(content)
#
# f.close()





